We suggest a new mean field method for studying the thermodynamic competition between magnetic and superconducting phases in a two-dimensional square lattice. A partition function is constructed by writing microscopic interactions that describe the exchange of density and spin-fluctuations. A block structure dictated by spin, time-reversal, and bipartite symmetries is imposed on the single-particle Hamiltonian. The detailed dynamics of the interactions are neglected and replaced by a normal distribution of random matrix elements. The resulting partition function can be calculated exactly. The thermodynamic potential has a structure which depends only on the spectrum of quasiparticles propagating in fixed condensation fields, with coupling constants that can be related directly to the variances of the microscopic processes. The resulting phase diagram reveals a fixed number of phase topologies whose realizations depend on a single coupling-parameter ratio, alpha. Most phase topologies are realized for a broad range of values of alpha and can thus be considered robust with respect to moderate variations in the detailed description of the underlying interactions.